package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.system.domain.PStoreCart;
import com.ruoyi.system.domain.PUserAddress;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 咨询订单业务对象 p_order
 *
 * @author ruoyi
 * @date 2022-07-25
 */

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel("咨询订单业务对象")
public class POrderBo extends BaseEntity {

    /**
     *
     */
    @ApiModelProperty(value = "", required = true)
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    @ApiModelProperty(value = "订单号")
    private String orderNo;

    /**
     * 订单标题
     */
    @ApiModelProperty(value = "订单标题", required = true)
    private String title;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id", required = true)
    private Long userId;

    /**
     * 咨询师id
     */
    @ApiModelProperty(value = "咨询师id", required = true)
    private Long adviserId;

    /**
     * 服务类型 0 立即咨询 1 预约咨询 2 文字咨询 3 包月套餐
     */
    @ApiModelProperty(value = "服务类型 0 立即咨询 1 预约咨询 2 文字咨询 3 包月套餐", required = true)
    private String serviceType;

    /**
     * 是否使用优惠券 0 否 1 是
     */
    @ApiModelProperty(value = "是否使用优惠券 0 否 1 是", required = true)
    private String isCoupon;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", required = true)
    private Date startTime;

    /**
     * 咨询时长
     */
    @ApiModelProperty(value = "咨询时长", required = true)
    private String timeSize;

    /**
     * 咨询类型
     */
    @ApiModelProperty(value = "咨询类型", required = true)
    private Long askType;

    /**
     * 预约时间
     */
    @ApiModelProperty(value = "预约时间", required = true)
    private Date appointmentTime;

    @ApiModelProperty(value = "预约时间段")
    private String eventPeriod;

    /**
     * 订单金额
     */
    @ApiModelProperty(value = "订单金额", required = true)
    @NotNull(message = "订单金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal price;

    /**
     * 订单状态 0 待付款 1 待咨询 2 待评价 3 已完成 4 已取消
     */
    @ApiModelProperty(value = "订单状态 0 待付款 1 待咨询 2 待评价 3 已完成 4 已取消", required = true)
    private String orderStatus;

    /**
     * 支付类型 0 余额 1 微信
     */
    @ApiModelProperty(value = "支付类型 0 余额 1 微信", required = true)
    @NotBlank(message = "支付类型 0 余额 1 微信不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payType;

    /**
     * 订单备注
     */
    @ApiModelProperty(value = "订单备注", required = true)
    private String remark;

    /**
     * 取消原因
     */
    @ApiModelProperty(value = "取消原因", required = true)
    private String returnRemark;

    /**
     * 订单类型 0 测试订单 1 咨询订单
     */
    @ApiModelProperty(value = "订单类型 0 测试订单 1 咨询订单 2 商城订单 3 开通vip 4 余额充值", required = true)
    @NotBlank(message = "订单类型 0 测试订单 1 咨询订单不能为空2商城订单", groups = { AddGroup.class, EditGroup.class })
    private String orderCategory;

    @ApiModelProperty(value = "购物券id")
    private Long couponId;

    @ApiModelProperty(value = "购物券抵押金额")
    private BigDecimal couponPrice;

    @ApiModelProperty(value = "真实付款")
    private BigDecimal actualPrice;

    @ApiModelProperty(value = "咨询题目id")
    private Long topicId;

    @ApiModelProperty(value = "openid")
    private String openId;

    @ApiModelProperty(value = "购物车商品集合")
    private List<PStoreCart> products;

    @ApiModelProperty(value = "收货地址")
    private PUserAddress address;

    @ApiModelProperty(value = "会员等级")
    private String vipValue;
}
